
#ifndef DESIGN_PATTERNS_BUILDER_COMPUTERBUILDER_H
#define DESIGN_PATTERNS_BUILDER_COMPUTERBUILDER_H

#include "Computer.h"

class ComputerBuilder
{
protected:
  Computer* computer;

public:
  ComputerBuilder();

  virtual void BuildCpu() = 0;

  virtual void BuildMem() = 0;

  virtual void BuildKeyboard() = 0;

  virtual void BuildMonitor() = 0;

  virtual Computer* complete();

  // computer对象不应该由ComputerBuilder销毁，而是应该由使用者摧毁。
  virtual ~ComputerBuilder() = default;
};

#endif //DESIGN_PATTERNS_BUILDER_COMPUTERBUILDER_H
